#ifndef __STDMYSTRING_H_
#define __STDMYSTRING_H_

#include <iostream>
class StdMyString 
{
public:
    StdMyString();
    explicit StdMyString(const char *str);
    StdMyString(const StdMyString &str);
    ~StdMyString();

    char At(int index);
    char &operator[](int index);

    bool Contains(const char *str);
    bool Contains(const StdMyString &str);
    int Find(const char *str);
    int Find(const StdMyString &str);
    StdMyString GetString(int start, int end);
    void InsertByIndex(const char *str, int index);
    void InsertByIndex(const StdMyString &str, int index);
    
    operator int();
    operator float();
    
    StdMyString &operator=(const char *str);
    StdMyString &operator=(const StdMyString &str);
    StdMyString operator+(const char *str);
    StdMyString operator+(const StdMyString &str);
    void operator+=(const char *str);
    void operator+=(const StdMyString &str);
    bool operator==(const char *str);
    bool operator==(const StdMyString &str);
    bool operator!=(const char *str);
    bool operator!=(const StdMyString &str);
    bool operator>(const char *str);
    bool operator>(const StdMyString &str);
    bool operator<(const char *str);
    bool operator<(const StdMyString &str);

    friend std::ostream& operator<<(std::ostream& out, const StdMyString& str);
    static StdMyString Number(int num);
    static StdMyString Number(float num);
private:
    char *str;
    int size;
    int len;
}; 
std::ostream& operator<<(std::ostream& out, const StdMyString& str);
#endif